package org.komarichin.beans.dao;

import org.komarichin.beans.ILanguage;

import java.util.Collection;

/**
 * extends Generic dao methods depends by language
 * User: Mykhaylo Komarichyn
 * Date: 17.03.2010
 * Time: 11:09:29
 */
public interface IGenericLanguageDAO<T, PK> extends IGenericDAO<T, PK> {
    /**
     * @param lang language {@link org.komarichin.beans.ILanguage}
     * @return count entities
     */
    int getCountEntities(ILanguage lang);

    /**
     * @param start     start result
     * @param limit     max returned result in query
     * @param fieldName field by sorting
     * @param order     sort order, true as asc, false as desc
     * @param lang      language {@link org.komarichin.beans.ILanguage}
     * @return result as article object by criteria
     */
    Collection<T> getEntityByParams(int start, int limit, String fieldName, boolean order, ILanguage lang);

    /**
     * @param lang language {@link org.komarichin.beans.ILanguage}
     * @return all entities in bd by language
     */
    Collection<T> getAll(ILanguage lang);

}
